<template>
  <ant-modal
    modalWidth="1024"
    modalHeight="820"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model
      ref="form"
      :model="form"
      :rules="rules"
      slot="content"
      layout="vertical"
    >
      <a-row :gutter="32" style="width: 90%; margin-left: 5%">
        <a-col :span="12">
          <a-form-model-item label="标题" prop="title">
            <a-input v-model="form.title" placeholder="请输入标题" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="附件" prop="fileName">
            <file-upload
              :fileList="fileList"
              @afterUpload="uploadCompleteFile"
              @removeFile="handlerRemoveFile"
            ></file-upload>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row :gutter="32" style="width: 90%; margin-left: 5%">
        <a-col :span="12">
          <a-form-model-item label="督办企业" prop="deptIds">
            <a-tree-select
              v-model="form.deptIds"
              placeholder="请选择所属单位"
              :tree-data="deptOptions"
              tree-default-expand-all
              :replaceFields="{
                children: 'children',
                title: 'title',
                key: 'id',
                value: 'id',
              }"
              allow-clear
              multiple
              @change="onTreeChange"
              @select="onSelect"
            >
            </a-tree-select>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row :gutter="32" style="width: 90%; margin-left: 5%">
        <a-col :span="24">
          <a-tabs>
            <a-tab-pane key="1" tab="内容详情">
              <a-textarea
                v-model="form.content"
                placeholder="请输入内容详情"
                :auto-size="{ minRows: 20, maxRows: 35 }"
              ></a-textarea>
            </a-tab-pane>
          </a-tabs>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button @click="cancel"> 取消 </a-button>
      <a-button type="primary" @click="submitForm"> 保存 </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizLinshiManageAddForm from "./BizLinshiManageForm";
export default {
  ...BizLinshiManageAddForm,
};
</script>
